home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
- Begin VB.MDIForm MainFrame
- BackColor = &H8000000C&
- Caption = "MDIForm1"
- ClientHeight = 6900
- ClientLeft = 1905
- ClientTop = 1875
- ClientWidth = 10440
- LinkTopic = "MDIForm1"
- Begin ComctlLib.Toolbar tlbStandard
- Align = 1 'Align Top
- Height = 420
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 10440
- _ExtentX = 18415
- _ExtentY = 741
- ButtonWidth = 635
- ButtonHeight = 582
- Appearance = 1
- ImageList = "ImageList2"
- _Version = 327680
- BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
- NumButtons = 18
- BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "New"
- Object.ToolTipText = "New"
- Object.Tag = ""
- ImageIndex = 1
- EndProperty
- BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Open"
- Object.ToolTipText = "Open"
- Object.Tag = ""
- ImageIndex = 2
- EndProperty
- BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Save"
- Object.ToolTipText = "Save"
- Object.Tag = ""
- ImageIndex = 3
- EndProperty
- BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Object.Tag = ""
- Style = 3
- MixedState = -1 'True
- EndProperty
- BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Print"
- Object.ToolTipText = "Print"
- Object.Tag = ""
- ImageIndex = 4
- EndProperty
- BeginProperty Button6 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Preview"
- Object.ToolTipText = "Print Preview"
- Object.Tag = ""
- ImageIndex = 5
- EndProperty
- BeginProperty Button7 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Object.Tag = ""
- Style = 3
- MixedState = -1 'True
- EndProperty
- BeginProperty Button8 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Cut"
- Object.ToolTipText = "Cut"
- Object.Tag = ""
- ImageIndex = 6
- EndProperty
- BeginProperty Button9 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Copy"
- Object.ToolTipText = "Copy"
- Object.Tag = ""
- ImageIndex = 7
- EndProperty
- BeginProperty Button10 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Paste"
- Object.ToolTipText = "Paste"
- Object.Tag = ""
- ImageIndex = 8
- EndProperty
- BeginProperty Button11 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Painter"
- Object.ToolTipText = "Format Painter"
- Object.Tag = ""
- ImageIndex = 9
- EndProperty
- BeginProperty Button12 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Object.Tag = ""
- Style = 3
- MixedState = -1 'True
- EndProperty
- BeginProperty Button13 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Draw"
- Object.ToolTipText = "Drawing Toolbar"
- Object.Tag = ""
- ImageIndex = 10
- EndProperty
- BeginProperty Button14 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Object.Tag = ""
- Style = 3
- MixedState = -1 'True
- EndProperty
- BeginProperty Button15 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Enabled = 0 'False
- Key = "Spell"
- Object.ToolTipText = "Spell Check"
- Object.Tag = ""
- ImageIndex = 11
- EndProperty
- BeginProperty Button16 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Sum"
- Object.ToolTipText = "Sum"
- Object.Tag = ""
- ImageIndex = 12
- EndProperty
- BeginProperty Button17 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "SortA"
- Object.ToolTipText = "Sort Ascending"
- Object.Tag = ""
- ImageIndex = 13
- EndProperty
- BeginProperty Button18 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "SortD"
- Object.ToolTipText = "Sort Descending"
- Object.Tag = ""
- ImageIndex = 14
- EndProperty
- EndProperty
- End
- Begin ComctlLib.Toolbar tlbFormat
- Align = 1 'Align Top
- Height = 420
- Left = 0
- TabIndex = 1
- Top = 420
- Width = 10440
- _ExtentX = 18415
- _ExtentY = 741
- ButtonWidth = 635
- ButtonHeight = 582
- Appearance = 1
- ImageList = "ImageList3"
- _Version = 327680
- BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
- NumButtons = 18
- BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "FontName"
- Object.Tag = ""
- Style = 4
- Object.Width = 2650
- MixedState = -1 'True
- EndProperty
- BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Fontsize"
- Object.Tag = ""
- Style = 4
- Object.Width = 1000
- MixedState = -1 'True
- EndProperty
- BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Bold"
- Object.ToolTipText = "Bold"
- Object.Tag = ""
- ImageIndex = 1
- EndProperty
- BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Italics"
- Object.ToolTipText = "Italics"
- Object.Tag = ""
- ImageIndex = 2
- EndProperty
- BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Underline"
- Object.ToolTipText = "Underline"
- Object.Tag = ""
- ImageIndex = 3
- EndProperty
- BeginProperty Button6 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Color"
- Object.ToolTipText = "Text Color"
- Object.Tag = ""
- ImageIndex = 4
- EndProperty
- BeginProperty Button7 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Object.Tag = ""
- Style = 3
- MixedState = -1 'True
- EndProperty
- BeginProperty Button8 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Left"
- Object.ToolTipText = "Left Justify"
- Object.Tag = ""
- ImageIndex = 5
- EndProperty
- BeginProperty Button9 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Center"
- Object.ToolTipText = "Center Justify"
- Object.Tag = ""
- ImageIndex = 6
- EndProperty
- BeginProperty Button10 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Right"
- Object.ToolTipText = "Right Justify"
- Object.Tag = ""
- ImageIndex = 7
- EndProperty
- BeginProperty Button11 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Across"
- Object.ToolTipText = "Center Across Cells"
- Object.Tag = ""
- ImageIndex = 8
- EndProperty
- BeginProperty Button12 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Object.Tag = ""
- Style = 3
- MixedState = -1 'True
- EndProperty
- BeginProperty Button13 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Object.Visible = 0 'False
- Key = "Fixed"
- Object.ToolTipText = "Fixed and General"
- Object.Tag = ""
- ImageIndex = 15
- EndProperty
- BeginProperty Button14 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Object.Visible = 0 'False
- Key = "Currency"
- Object.ToolTipText = "Currency"
- Object.Tag = ""
- ImageIndex = 10
- EndProperty
- BeginProperty Button15 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Object.Visible = 0 'False
- Key = "Percent"
- Object.ToolTipText = "Percent"
- Object.Tag = ""
- ImageIndex = 11
- EndProperty
- BeginProperty Button16 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Object.Visible = 0 'False
- Key = "Fraction"
- Object.ToolTipText = "Fraction"
- Object.Tag = ""
- ImageIndex = 12
- EndProperty
- BeginProperty Button17 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Object.Visible = 0 'False
- Key = "Date_time"
- Object.ToolTipText = "Date/Time"
- Object.Tag = ""
- ImageIndex = 13
- EndProperty
- BeginProperty Button18 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Object.Tag = ""
- Style = 4
- Object.Width = 1100
- MixedState = -1 'True
- EndProperty
- EndProperty
- Begin VB.ComboBox cboZoom
- Height = 315
- ItemData = "MainFrame.frx":0000
- Left = 6840
- List = "MainFrame.frx":0013
- TabIndex = 6
- Text = "100%"
- Top = 30
- Width = 975
- End
- Begin VB.ComboBox cboFontSize
- Height = 315
- ItemData = "MainFrame.frx":0032
- Left = 2600
- List = "MainFrame.frx":0057
- TabIndex = 3
- Text = "10"
- Top = 30
- Width = 975
- End
- Begin VB.ComboBox cboFontName
- Height = 315
- Left = 120
- Sorted = -1 'True
- TabIndex = 2
- Text = "Arial"
- Top = 30
- Width = 2415
- End
- End
- Begin ComctlLib.Toolbar tlbDraw
- Align = 2 'Align Bottom
- Height = 420
- Left = 0
- TabIndex = 4
- Top = 6165
- Visible = 0 'False
- Width = 10440
- _ExtentX = 18415
- _ExtentY = 741
- ButtonWidth = 635
- ButtonHeight = 582
- Appearance = 1
- ImageList = "ImageList1"
- _Version = 327680
- BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
- NumButtons = 12
- BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Enabled = 0 'False
- Key = "PointEdit"
- Object.ToolTipText = "Polygon Point Edit Mode"
- Object.Tag = ""
- ImageIndex = 1
- EndProperty
- BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Object.Tag = ""
- Style = 3
- MixedState = -1 'True
- EndProperty
- BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Line"
- Object.ToolTipText = "Line Drawing Mode"
- Object.Tag = ""
- ImageIndex = 2
- EndProperty
- BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Rectangle"
- Object.ToolTipText = "Rectangle Drawing Mode"
- Object.Tag = ""
- ImageIndex = 3
- EndProperty
- BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Oval"
- Object.ToolTipText = "Oval Drawing Mode"
- Object.Tag = ""
- ImageIndex = 4
- EndProperty
- BeginProperty Button6 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Arc"
- Object.ToolTipText = "Arc Drawing Mode"
- Object.Tag = ""
- ImageIndex = 5
- EndProperty
- BeginProperty Button7 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Polygon"
- Object.ToolTipText = "Polygon Edit Mode"
- Object.Tag = ""
- ImageIndex = 6
- EndProperty
- BeginProperty Button8 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Object.Tag = ""
- Style = 3
- MixedState = -1 'True
- EndProperty
- BeginProperty Button9 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Button"
- Object.ToolTipText = "Button Drawing Mode"
- Object.Tag = ""
- ImageIndex = 7
- EndProperty
- BeginProperty Button10 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Checkbox"
- Object.ToolTipText = "Checkbox Drawing Mode"
- Object.Tag = ""
- ImageIndex = 8
- EndProperty
- BeginProperty Button11 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Listbox"
- Object.ToolTipText = "Listbox Drawing Mode"
- Object.Tag = ""
- ImageIndex = 9
- EndProperty
- BeginProperty Button12 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Chart"
- Object.ToolTipText = "Chart Drawing Mode"
- Object.Tag = ""
- ImageIndex = 10
- EndProperty
- EndProperty
- End
- Begin MSComDlg.CommonDialog comdlg
- Left = 3840
- Top = 3240
- _ExtentX = 847
- _ExtentY = 847
- _Version = 327680
- End
- Begin VB.Timer Timer1
- Interval = 500
- Left = 6600
- Top = 2160
- End
- Begin ComctlLib.StatusBar sbar1
- Align = 2 'Align Bottom
- Height = 315
- Left = 0
- TabIndex = 5
- Top = 6585
- Width = 10440
- _ExtentX = 18415
- _ExtentY = 556
- SimpleText = ""
- ShowTips = 0 'False
- _Version = 327680
- BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
- NumPanels = 4
- BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7}
- AutoSize = 1
- Bevel = 0
- Object.Width = 13944
- MinWidth = 5080
- TextSave = ""
- Object.Tag = ""
- EndProperty
- BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7}
- Style = 1
- Alignment = 1
- AutoSize = 2
- Enabled = 0 'False
- Object.Width = 1296
- MinWidth = 1305
- TextSave = "CAPS"
- Object.Tag = ""
- EndProperty
- BeginProperty Panel3 {0713E89F-850A-101B-AFC0-4210102A8DA7}
- Style = 2
- Alignment = 1
- AutoSize = 2
- Enabled = 0 'False
- Object.Width = 1296
- MinWidth = 1305
- TextSave = "NUM"
- Object.Tag = ""
- EndProperty
- BeginProperty Panel4 {0713E89F-850A-101B-AFC0-4210102A8DA7}
- Style = 4
- Alignment = 1
- AutoSize = 2
- Enabled = 0 'False
- Object.Width = 1296
- MinWidth = 1305
- TextSave = "SCRL"
- Object.Tag = ""
- EndProperty
- EndProperty
- End
- Begin ComctlLib.ImageList ImageList3
- Left = 0
- Top = 1440
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 327680
- BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
- NumListImages = 15
- BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":0086
- Key = ""
- EndProperty
- BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":0198
- Key = ""
- EndProperty
- BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":02AA
- Key = ""
- EndProperty
- BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":03BC
- Key = ""
- EndProperty
- BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":07C6
- Key = ""
- EndProperty
- BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":08D8
- Key = ""
- EndProperty
- BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":09EA
- Key = ""
- EndProperty
- BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":0AFC
- Key = ""
- EndProperty
- BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":0DEE
- Key = ""
- EndProperty
- BeginProperty ListImage10 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":2C10
- Key = ""
- EndProperty
- BeginProperty ListImage11 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":3022
- Key = ""
- EndProperty
- BeginProperty ListImage12 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":3314
- Key = ""
- EndProperty
- BeginProperty ListImage13 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":363E
- Key = ""
- EndProperty
- BeginProperty ListImage14 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":3958
- Key = ""
- EndProperty
- BeginProperty ListImage15 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":4CC2
- Key = ""
- EndProperty
- EndProperty
- End
- Begin ComctlLib.ImageList ImageList2
- Left = 0
- Top = 840
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 327680
- BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
- NumListImages = 15
- BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":68BC
- Key = ""
- EndProperty
- BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":69CE
- Key = ""
- EndProperty
- BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":6AC8
- Key = ""
- EndProperty
- BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":6BDA
- Key = ""
- EndProperty
- BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":6CEC
- Key = ""
- EndProperty
- BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":722E
- Key = ""
- EndProperty
- BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":7770
- Key = ""
- EndProperty
- BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":7CB2
- Key = ""
- EndProperty
- BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":81F4
- Key = ""
- EndProperty
- BeginProperty ListImage10 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":8736
- Key = ""
- EndProperty
- BeginProperty ListImage11 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":8848
- Key = ""
- EndProperty
- BeginProperty ListImage12 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":8D8A
- Key = ""
- EndProperty
- BeginProperty ListImage13 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":8E9C
- Key = ""
- EndProperty
- BeginProperty ListImage14 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":8FAE
- Key = ""
- EndProperty
- BeginProperty ListImage15 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":90C0
- Key = ""
- EndProperty
- EndProperty
- End
- Begin ComctlLib.ImageList ImageList1
- Left = 120
- Top = 5640
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 327680
- BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
- NumListImages = 10
- BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":9602
- Key = ""
- EndProperty
- BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":991C
- Key = ""
- EndProperty
- BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":9A2E
- Key = ""
- EndProperty
- BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":9B40
- Key = ""
- EndProperty
- BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":9C52
- Key = ""
- EndProperty
- BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":9D64
- Key = ""
- EndProperty
- BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":A07E
- Key = ""
- EndProperty
- BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":A398
- Key = ""
- EndProperty
- BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":A6B2
- Key = ""
- EndProperty
- BeginProperty ListImage10 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "MainFrame.frx":A9CC
- Key = ""
- EndProperty
- EndProperty
- End
- Begin VB.Menu mnuFile
- Caption = "&File"
- Begin VB.Menu mnuFileNew
- Caption = "&New"
- Shortcut = ^N
- End
- Begin VB.Menu mnuFileOpen
- Caption = "&Open..."
- Shortcut = ^O
- End
- Begin VB.Menu mnuFileClose
- Caption = "&Close"
- End
- Begin VB.Menu mnuFileSave
- Caption = "&Save"
- Shortcut = ^S
- End
- Begin VB.Menu mnuFileSaveAs
- Caption = "Save &As..."
- End
- Begin VB.Menu mnuFileSep1
- Caption = "-"
- End
- Begin VB.Menu mnuFilePageSetup
- Caption = "Pa&ge Setup..."
- End
- Begin VB.Menu mnuFilePrintPreview
- Caption = "Print Pre&view"
- End
- Begin VB.Menu mnuFilePrint
- Caption = "&Print..."
- Shortcut = ^P
- End
- Begin VB.Menu mnuFileSep2
- Caption = "-"
- End
- Begin VB.Menu mnuFileExit
- Caption = "E&xit"
- End
- End
- Begin VB.Menu mnuEdit
- Caption = "&Edit"
- Begin VB.Menu mnuEditCut
- Caption = "Cu&t"
- Shortcut = ^X
- End
- Begin VB.Menu mnuEditCopy
- Caption = "&Copy"
- Shortcut = ^C
- End
- Begin VB.Menu mnuEditPast
- Caption = "&Paste"
- Shortcut = ^V
- End
- Begin VB.Menu mnuEditPasteSpecial
- Caption = "Paste &Special"
- Enabled = 0 'False
- End
- Begin VB.Menu mnuEditCopyCellFormat
- Caption = "Cop&y Cell Format"
- End
- Begin VB.Menu mnuEditSep1
- Caption = "-"
- End
- Begin VB.Menu mnuEditPolygonPoints
- Caption = "Polygo&n Points"
- Enabled = 0 'False
- End
- Begin VB.Menu mnuEditSelectAllObjects
- Caption = "Select All &Objects"
- Enabled = 0 'False
- End
- Begin VB.Menu mnuEditSep2
- Caption = "-"
- End
- Begin VB.Menu mnuEditSort
- Caption = "So&rt..."
- End
- Begin VB.Menu mnuEditFill
- Caption = "F&ill"
- Begin VB.Menu mnuEditFillDown
- Caption = "&Down"
- Shortcut = ^D
- End
- Begin VB.Menu mnuEditFillRight
- Caption = "&Right"
- Shortcut = ^R
- End
- End
- Begin VB.Menu mnuEditClear
- Caption = "Cle&ar"
- Begin VB.Menu mnuEditClearAll
- Caption = "&All"
- End
- Begin VB.Menu mnuEditClearFormats
- Caption = "&Formats"
- End
- Begin VB.Menu mnuEditClearContents
- Caption = "&Contents"
- Shortcut = {DEL}
- End
- End
- Begin VB.Menu mnuEditDelete
- Caption = "&Delete..."
- End
- Begin VB.Menu mnuEditDeleteSheet
- Caption = "De&lete Sheet"
- Enabled = 0 'False
- End
- Begin VB.Menu mnuEditSep3
- Caption = "-"
- End
- Begin VB.Menu mnuEditFind
- Caption = "&Find..."
- Shortcut = ^F
- End
- Begin VB.Menu mnuEditReplace
- Caption = "R&eplace"
- Shortcut = ^H
- End
- Begin VB.Menu mnuEditGoTo
- Caption = "&Go To"
- Shortcut = ^G
- End
- End
- Begin VB.Menu mnuView
- Caption = "&View"
- Begin VB.Menu mnuViewToolbars
- Caption = "&Toolbars"
- Begin VB.Menu mnuViewToolbarsStandard
- Caption = "&Standard"
- Checked = -1 'True
- End
- Begin VB.Menu mnuViewToolbarsFormatting
- Caption = "&Formatting"
- Checked = -1 'True
- End
- Begin VB.Menu mnuViewToolbarsDrawing
- Caption = "&Drawing and Forms"
- End
- End
- Begin VB.Menu mnuViewFormulaBar
- Caption = "&Formula Bar"
- Checked = -1 'True
- End
- Begin VB.Menu mnuViewStatusBar
- Caption = "&Status Bar"
- Checked = -1 'True
- End
- End
- Begin VB.Menu mnuInsert
- Caption = "&Insert"
- Begin VB.Menu mnuInsertCells
- Caption = "C&ells..."
- End
- Begin VB.Menu mnuInsertRows
- Caption = "&Rows"
- End
- Begin VB.Menu mnuInsertColumns
- Caption = "&Columns"
- End
- Begin VB.Menu mnuInsertWorksheet
- Caption = "&Worksheet"
- End
- Begin VB.Menu mnuInsertChart
- Caption = "C&hart"
- End
- Begin VB.Menu mnuInsertSep1
- Caption = "-"
- End
- Begin VB.Menu mnuInsertPageBreak
- Caption = "Page &Break"
- End
- Begin VB.Menu mnuInsertName
- Caption = "&Name..."
- End
- Begin VB.Menu mnuInsertSep2
- Caption = "-"
- End
- Begin VB.Menu mnuInsertDrawingObject
- Caption = "&Drawing Object"
- Begin VB.Menu mnuInsertDOArc
- Caption = "&Arc"
- End
- Begin VB.Menu mnuInsertDOLine
- Caption = "&Line"
- End
- Begin VB.Menu mnuInsertDOOval
- Caption = "&Oval"
- End
- Begin VB.Menu mnuInsertDOPolygon
- Caption = "&Polygon"
- End
- Begin VB.Menu mnuInsertDORectangle
- Caption = "&Rectangle"
- End
- End
- Begin VB.Menu mnuInsertFormsObject
- Caption = "&Forms Object"
- Begin VB.Menu mnuInsertFOButton
- Caption = "&Button"
- End
- Begin VB.Menu mnuInsertFOCheckbox
- Caption = "&Checkbox"
- End
- Begin VB.Menu mnuInsertFOListbox
- Caption = "&Dropdown Listbox"
- End
- End
- Begin VB.Menu mnuInsertSep3
- Caption = "-"
- End
- Begin VB.Menu mnuInsertCancel
- Caption = "C&ancel Insert Object"
- Enabled = 0 'False
- End
- End
- Begin VB.Menu mnuFormat
- Caption = "F&ormat"
- Begin VB.Menu mnuFormatCells
- Caption = "C&ells..."
- End
- Begin VB.Menu mnuFormatRow
- Caption = "&Row"
- Begin VB.Menu mnuFormatRowHeight
- Caption = "H&eight..."
- End
- Begin VB.Menu mnuFormatRowHide
- Caption = "&Hide"
- End
- Begin VB.Menu mnuFormatRowUnhide
- Caption = "&Unhide"
- End
- Begin VB.Menu mnuFormatRowDefaultHgt
- Caption = "&Default Height..."
- End
- End
- Begin VB.Menu mnuFormatColumn
- Caption = "&Column"
- Begin VB.Menu mnuFormatColumnWidth
- Caption = "&Width..."
- End
- Begin VB.Menu mnuFormatColumnAutoFit
- Caption = "&AutoFit Selection"
- End
- Begin VB.Menu mnuFormatColumnHide
- Caption = "&Hide"
- End
- Begin VB.Menu mnuFormatColumnUnhide
- Caption = "&Unhide"
- End
- Begin VB.Menu mnuFormatColumnDefaultWdt
- Caption = "&Default Width..."
- End
- End
- Begin VB.Menu mnuFormatSheet
- Caption = "S&heet"
- Begin VB.Menu mnuFormatSheetProperties
- Caption = "&Properties..."
- End
- Begin VB.Menu mnuFormatSheetProtection
- Caption = "P&rotection"
- End
- End
- Begin VB.Menu mnuFormatPrinting
- Caption = "&Printing"
- Begin VB.Menu mnuFormatPrintArea
- Caption = "Set Print &Area"
- End
- Begin VB.Menu mnuFormatPrintTitles
- Caption = "Set Print &Titles"
- End
- End
- Begin VB.Menu mnuFormatSep1
- Caption = "-"
- End
- Begin VB.Menu mnuFormatFreezePanes
- Caption = "&Freeze Panes"
- Enabled = 0 'False
- End
- Begin VB.Menu mnuFormatDefaultFont
- Caption = "&Default Font..."
- End
- Begin VB.Menu mnuFormatSep2
- Caption = "-"
- End
- Begin VB.Menu mnuFormatObject
- Caption = "&Object..."
- Enabled = 0 'False
- End
- Begin VB.Menu mnuFormatBringToFront
- Caption = "&Bring To Front"
- Enabled = 0 'False
- End
- Begin VB.Menu mnuFormatSendToBack
- Caption = "&Send To Back"
- Enabled = 0 'False
- End
- End
- Begin VB.Menu mnuTools
- Caption = "&Tools"
- Begin VB.Menu mnuToolsRecalc
- Caption = "Recalc"
- Shortcut = {F9}
- End
- Begin VB.Menu mnuToolsOptions
- Caption = "&Options..."
- End
- End
- Begin VB.Menu mnuWindow
- Caption = "&Window"
- Begin VB.Menu mnuWindowNew
- Caption = "&New Window"
- End
- Begin VB.Menu mnuWindowCascade
- Caption = "&Cascade"
- End
- Begin VB.Menu mnuWindowTile
- Caption = "&Tile"
- End
- Begin VB.Menu mnuWindowArrangeIcons
- Caption = "&Arrange Icons"
- End
- End
- Begin VB.Menu mnuHelp
- Caption = "&Help"
- Begin VB.Menu mnuHelpAbout
- Caption = "&About SSMDI..."
- End
- End
- Begin VB.Menu mnuFixed
- Caption = "Fixed"
- Visible = 0 'False
- Begin VB.Menu mnuFixed0
- Caption = "0"
- End
- Begin VB.Menu mnuFixed0_0
- Caption = "0.0"
- End
- Begin VB.Menu mnuFixed0_00
- Caption = "0.00"
- End
- End
- Attribute VB_Name = "MainFrame"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim Painterclick As Boolean
- Private Sub SpellCheck()
- Dim lRow&, lCol&, lSheet&, lSR&, lER&, lSC&, lEC&
- Dim iCellType%, iSelection
- Dim tSelect As F1RangeRef
- VSSpell1.AutoPopup = True 'Let VisualSpeller handle the checking
- 'Loop through all the columns and rows of all the selected sheets
- For lSheet = 1 To MainFrame.ActiveForm.ss.NumSheets
- If MainFrame.ActiveForm.ss.SheetSelected(lSheet) Then
-
- 'Check to see if there is more than one selection.
- 'If so, then we'll spell check only the words in the
- 'selection(s).
- If MainFrame.ActiveForm.ss.SelectionCount > 1 Then
-
- For iSelection = 0 To MainFrame.ActiveForm.ss.SelectionCount - 1
- tSelect = MainFrame.ActiveForm.ss.SelectionEx(iSelection)
- 'Get the Selection 'Coordinates'
- With tSelect
- lSR = .StartRow
- lER = .EndRow
- lSC = .StartCol
- lEC = .EndCol
- End With
-
- For lRow = lSR To lER
- For lCol = lSC To lEC
-
- iCellType = MainFrame.ActiveForm.ss.TypeSRC(lSheet, lRow, lCol)
- If iCellType = 2 Then 'Text
-
- VSSpell1.CheckText = MainFrame.ActiveForm.ss.TextSRC(lSheet, lRow, lCol)
- If VSSpell1.ResultCode = -3 Then
- Exit Sub
- End If
- MainFrame.ActiveForm.ss.TextSRC(lSheet, lRow, lCol) = VSSpell1.Text
-
- End If
-
- Next lCol
- Next lRow
- Next iSelection
-
- Else ' only one selection made..We'll cycle through that selection
- ' or the whole sheet if there is only one cell selected.
- Set tSelect = MainFrame.ActiveForm.ss.SelectionEx(0)
- 'Get the selection 'coordinates'
- With tSelect
- lSR = .StartRow
- lER = .EndRow
- lSC = .StartCol
- lEC = .EndCol
- End With
-
- If (lSR = lER And lSC = lEC) Then 'just single cell selected, check complete sheet(s)
-
- For lRow = 1 To MainFrame.ActiveForm.ss.LastRow
- For lCol = 1 To MainFrame.ActiveForm.ss.LastCol
-
- iCellType = MainFrame.ActiveForm.ss.TypeSRC(lSheet, lRow, lCol)
- 'Check to see if the data in the cell is text, if so spell check it.
- If iCellType = 2 Then
- 'pass text in cell to spell checker
- VSSpell1.CheckText = MainFrame.ActiveForm.ss.TextSRC(lSheet, lRow, lCol)
- If VSSpell1.ResultCode = -3 Then 'Spell check was cancelled
- Exit Sub
- End If
- 'pass checked text back into the cell
- MainFrame.ActiveForm.ss.TextSRC(lSheet, lRow, lCol) = VSSpell1.Text
- End If
-
- Next lCol
- Next lRow
-
- Else ' loop through selection
-
- For lRow = lSR To lER
- For lCol = lSC To lEC
-
- iCellType = MainFrame.ActiveForm.ss.TypeSRC(lSheet, lRow, lCol)
- If iCellType = 2 Then
- VSSpell1.CheckText = MainFrame.ActiveForm.ss.TextSRC(lSheet, lRow, lCol)
- If VSSpell1.ResultCode = -3 Then
- Exit Sub
- End If
- MainFrame.ActiveForm.ss.TextSRC(lSheet, lRow, lCol) = VSSpell1.Text
- End If
-
- Next lCol
- Next lRow
-
- End If
- End If
- End If
- Next lSheet
-
- End Sub
- Private Sub cboFontName_Click()
- ''This Procedure will set the type of the font in the current cell(s) to the font that
- ''is entered in by the user, as long as it is non-empty and it is different from the previous font
- On Error Resume Next
- If Not (MainFrame.ActiveForm Is Nothing) Then
- If Len(Trim$(cboFontName.Text)) > 0 Then
- MainFrame.ActiveForm.ss.FontName = cboFontName.Text
- MainFrame.ActiveForm.SetFocus
- End If
- End If
- End Sub
- Private Sub cboFontName_KeyPress(KeyAscii As Integer)
- If KeyAscii = 13 Then
- Call cboFontName_Click
- End If
- End Sub
- Private Sub cboFontName_LostFocus()
- Call cboFontName_Click
- End Sub
- Private Sub cboFontSize_Click()
- On Error Resume Next
- If Not (MainFrame.ActiveForm Is Nothing) Then
- If Len(Trim$(cboFontSize.Text)) > 0 Then
- MainFrame.ActiveForm.ss.FontSize = CInt(Val(Trim$(cboFontSize.Text)))
- MainFrame.ActiveForm.ss.SetFocus
- End If
- End If
- End Sub
- Private Sub cboFontSize_KeyPress(KeyAscii As Integer)
- If KeyAscii = 13 Then
- Call cboFontSize_Click
- End If
- End Sub
- Private Sub cboFontSize_LostFocus()
- Call cboFontSize_Click
- End Sub
- Private Sub cboZoom_Click()
- If CInt(Val(cboZoom.Text)) > 10 And CInt(Val(cboZoom.Text)) < 400 Then
- MainFrame.ActiveForm.ss.ViewScale = CInt(Val(cboZoom.Text))
- Else
- MsgBox "View Scale must be between 10 and 400", vbOKCancel, "View Scale"
- cboZoom.Text = "100%"
- End If
- End Sub
- Private Sub cboZoom_KeyPress(KeyAscii As Integer)
- If KeyAscii = Asc(Chr$(13)) Then
- Call cboZoom_Click
- End If
- End Sub
- Private Sub cboZoom_LostFocus()
- Call cboZoom_Click
- End Sub
- Private Sub MDIForm_Activate()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.SetFocus
- End If
- End Sub
- Private Sub MDIForm_Load()
- Dim lFont&
- For lFont = 0 To Screen.FontCount - 1
- cboFontName.AddItem Screen.Fonts(lFont)
- Next lFont
- Painterclick = False
- End Sub
- Private Sub mnuEditSelectAllObjects_Click()
- Dim ss As F1Book
- Dim objcount&, j&
- On Error Resume Next
- If SSIsActiveForm() Then
- Set ss = MainFrame.ActiveForm.ss
- j = ss.ObjFirstID
- ss.ObjSetSelection j
- On Error GoTo ObjSelectAll
- Do
- j = ss.ObjNextID(j)
- ss.ObjAddSelection j
- Loop
- End If
- ObjSelectAll:
-
- End Sub
- Private Sub mnuFileExit_Click()
- End
- End Sub
- Private Sub mnuEdit_Click()
- Dim ss As F1Book
- Dim bObjectOnSheet As Boolean
- Dim lObjCount&, lCount&, lfirstid&
- Dim objtype As F1ObjTypeConstants
- Dim iSelected As Integer
- Dim rangeref As F1RangeRef
- If SSIsActiveForm() Then
-
- Set ss = MainFrame.ActiveForm.ss
- 'Check to see if Paste is available in workbook
- If ss.CanEditPaste Then
- mnuEditPast.Enabled = True
- Else
- mnuEditPast.Enabled = False
- End If
-
- 'check to see if special pasting can be done (i.e. paste f1 formats)
- If ss.CanEditPasteSpecial Then
- mnuEditPasteSpecial.Enabled = True
- Else
- mnuEditPasteSpecial.Enabled = False
- End If
-
- 'if number of selected sheets = 1 then we can delete a sheet. cannot uses
- 'delete sheet method if more than one sheet in the book is selected.
- iSelected = 0
-
- For lCount = 1 To ss.NumSheets
- If ss.SheetSelected(lCount) Then
- iSelected = iSelected + 1
- End If
- Next lCount
-
- If iSelected <> 1 Then
- mnuEditDeleteSheet.Enabled = False
- Else
- mnuEditDeleteSheet.Enabled = True
- End If
-
- 'Check For enabling the PolyPoints and Select All object menu items.
- lObjCount = ss.ObjGetSelectionCount
- mnuEditSelectAllObjects.Enabled = True
- bObjectOnSheet = True
- On Error GoTo SelectAllCheck
- lfirstid = ss.ObjFirstID
-
- If bObjectOnSheet Then
- mnuEditSelectAllObjects.Enabled = True
- mnuEditDelete.Caption = "&Delete Object"
- mnuEditPolygonPoints.Enabled = False
- mnuEditFind.Enabled = False
- mnuEditReplace.Enabled = False
- mnuEditSort.Enabled = False
- mnuEditCopyCellFormat.Enabled = False
- If lObjCount = 1 Then
- 'if type is polygon then we can change the mode for polygon points or movement.
- objid = ss.ObjSelection(0)
- objtype = ss.ObjGetType(objid)
- If objtype = F1ObjPolygon Then
- mnuEditPolygonPoints.Enabled = True
- Else
- mnuEditPolygonPoints.Enabled = False
- End If
- End If
-
- Else 'no objects on sheet
- mnuEditSelectAllObjects.Enabled = False
- mnuEditDelete.Enabled = True
- mnuEditFind.Enabled = True
- mnuEditReplace.Enabled = True
- mnuEditPolygonPoints.Enabled = False
- mnuEditSort.Enabled = True
- mnuEditCopyCellFormat = True
- Set rangeref = ss.SelectionEx(0)
-
- If ss.SelectionCount = 1 Then
- 'check range for correct Delete caption.
- If rangeref.EndCol <> 256 And rangeref.EndRow <> 16384 Then
- mnuEditDelete.Caption = "&Delete..."
- ElseIf rangeref.EndRow = 16384 And rangeref.EndCol = 256 Then
- mnuEditDelete.Enabled = False
- ElseIf rangeref.EndRow = 16384 Then
- mnuEditDelete.Caption = "&Delete Columns"
- ElseIf rangeref.EndCol = 256 Then
- mnuEditDelete.Caption = "&Delete Rows"
- End If
- Else
- mnuEditDelete.Enabled = False
- End If
- End If
- Exit Sub
- End If
- SelectAllCheck:
- bObjectOnSheet = False
- Resume Next
- End Sub
- Private Sub mnuEditClearAll_Click()
- Call C_Clear
- End Sub
- Private Sub mnuEditClearContents_Click()
- '' Clear the current value(s)
- On Local Error Resume Next
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.EditClear (F1ClearValues)
- End If
- End Sub
- Private Sub mnuEditClearFormats_Click()
- '' Clear the current format(s)
- On Local Error Resume Next
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.EditClear (F1ClearFormats)
- End If
- End Sub
- Private Sub mnuEditCopy_Click()
- Call C_Copy
- End Sub
- Private Sub mnuEditCopyCellFormat_Click()
- Call C_Copy
- End Sub
- Private Sub mnuEditCut_Click()
- Call C_Cut
- End Sub
- Private Sub mnuEditDelete_Click()
- Dim ss As F1Book
- Set ss = MainFrame.ActiveForm.ss
- If SSIsActiveForm() Then
- If mnuEditDelete.Caption = "&Delete..." Then
- ss.DeleteDlg
- ElseIf mnuEditDelete.Caption = "&Delete Object" Then
- ss.EditClear F1ClearAll
- ElseIf mnuEditDelete.Caption = "&Delete Rows" Then
- ss.EditDelete F1ShiftRows
- ElseIf mnuEditDelete.Caption = "&Delete Columns" Then
- ss.EditDelete F1ShiftCols
- End If
-
- End If
- End Sub
- Private Sub mnuEditDeleteSheet_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.EditDeleteSheets
- End If
- mnuEditDeleteSheet.Enabled = False
- End Sub
- Private Sub mnuEditFillDown_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.EditCopyDown
- End If
- End Sub
- Private Sub mnuEditFillRight_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.EditCopyRight
- End If
- End Sub
- Private Sub mnuEditFind_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.FindDlg
- End If
- End Sub
- Private Sub mnuEditGoTo_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.GotoDlg
- End If
- End Sub
- Private Sub mnuEditPast_Click()
- Call C_Paste
- End Sub
- Private Sub mnuEditPasteSpecial_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.EditPasteSpecial
- End If
- End Sub
- Private Sub mnuEditPolygonPoints_Click()
- If Not (MainFrame.ActiveForm Is Nothing) Then
- If MainFrame.ActiveForm.ss.PolyEditMode = F1PolyEditModeNormal Then
- MainFrame.ActiveForm.ss.PolyEditMode = F1PolyEditModePoints
- mnuEditPolygonPoints.Checked = True
- Else
- MainFrame.ActiveForm.ss.PolyEditMode = F1PolyEditModeNormal
- mnuEditPolygonPoints.Checked = False
- End If
- End If
- End Sub
- Private Sub mnuEditReplace_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.ReplaceDlg
- End If
- End Sub
- Private Sub mnuEditSort_Click()
- If SSIsActiveForm() Then '' Open up the sort dialog box if there
- MainFrame.ActiveForm.ss.SortDlg '' is a spreadsheet active
- End If
- End Sub
- Private Sub mnuFileClose_Click()
- If SSIsActiveForm() Then
- Unload MainFrame.ActiveForm
- End If
- End Sub
- Private Sub mnuFileNew_Click()
- Call C_New
- End Sub
- Private Sub mnuFileOpen_Click()
- Call SSMDIOpenFile("")
- End Sub
- Private Sub mnuFilePageSetup_Click()
- '' Open the page setup dialog box
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.FilePageSetupDlg
- End If
- End Sub
- Private Sub mnuFilePrint_Click()
- MainFrame.ActiveForm.ss.FilePrint True
- End Sub
- Private Sub mnuFilePrintPreview_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.FilePrintPreview
- End If
- End Sub
- Private Sub mnuFileSave_Click()
- Call C_Save
- End Sub
- Private Sub mnuFileSaveAs_Click()
- Dim response&
- If SSIsActiveForm() Then
- response = SSMDISaveAsFile
- End If
- End Sub
- Private Sub mnuFixed0_00_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.FormatFixed2
- End If
- End Sub
- Private Sub mnuFormat_Click()
- Dim ss As F1Book
- If SSIsActiveForm() Then
- Set ss = MainFrame.ActiveForm.ss
- If ss.FixedCols > 0 Or ss.FixedRows > 0 Then
- mnuFormatFreezePanes.Caption = "Un&freeze Panes"
- Else
- mnuFormatFreezePanes.Caption = "&Freeze Panes"
- End If
- If ss.ObjGetSelectionCount > 0 Then
- mnuFormatCells.Enabled = False
- mnuFormatRowHeight.Enabled = False
- mnuFormatRowHide.Enabled = False
- mnuFormatRowUnhide.Enabled = False
- mnuFormatColumnWidth.Enabled = False
- mnuFormatColumnAutoFit.Enabled = False
- mnuFormatColumnHide.Enabled = False
- mnuFormatColumnUnhide.Enabled = False
- mnuFormatFreezePanes.Enabled = False
- mnuFormatObject.Enabled = True
- mnuFormatBringToFront.Enabled = True
- mnuFormatSendToBack.Enabled = True
- Else
- mnuFormatCells.Enabled = True
- mnuFormatRowHeight.Enabled = True
- mnuFormatRowHide.Enabled = True
- mnuFormatRowUnhide.Enabled = True
- mnuFormatColumnWidth.Enabled = True
- mnuFormatColumnAutoFit.Enabled = True
- mnuFormatColumnHide.Enabled = True
- mnuFormatColumnUnhide.Enabled = True
- mnuFormatFreezePanes.Enabled = True
- mnuFormatObject.Enabled = False
- mnuFormatBringToFront.Enabled = False
- mnuFormatSendToBack.Enabled = False
- End If
- End If
- End Sub
- Private Sub mnuFormatBringToFront_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.ObjBringToFront
- End If
- mnuFormatBringToFront.Enabled = False
- End Sub
- Private Sub mnuFormatCells_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.FormatCellsDlg F1AllPages
- Call UpdateCBOFontAndSize ' Update the font and size cbos
- Call UpdateAlignment ' Set buttons according to selection alignment
- End If
- End Sub
- Private Sub mnuFormatColumnAutoFit_Click()
- Dim pSelection As F1RangeRef
- If SSIsActiveForm() Then
- Set pSelection = MainFrame.ActiveForm.ss.SelectionEx(0)
- MainFrame.ActiveForm.ss.SetColWidthAuto pSelection.StartRow, pSelection.StartCol, pSelection.EndRow, pSelection.EndCol, False
- End If
- End Sub
- Private Sub mnuFormatColumnDefaultWdt_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.DefColWidthDlg
- End If
- End Sub
- Private Sub mnuFormatColumnHide_Click()
- Dim pSelection As F1RangeRef
- If SSIsActiveForm() Then
- Set pSelection = MainFrame.ActiveForm.ss.SelectionEx(0)
- MainFrame.ActiveForm.ss.SetColHidden pSelection.StartCol, pSelection.EndCol, True
- End If
- End Sub
- Private Sub mnuFormatColumnUnhide_Click()
- Dim pSelection As F1RangeRef
- If ss Is ActiveForm() Then
- Set pSelection = MainFrame.ActiveForm.ss.SelectionEx(0)
- MainFrame.ActiveForm.ss.SetColHidden pSelection.StartCol, pSelection.EndCol, False
- End If
- End Sub
- Private Sub mnuFormatColumnWidth_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.ColWidthDlg
- End If
- End Sub
- Private Sub mnuFormatDefaultFont_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.FormatDefaultFontDlg
- Call UpdateCBOFontAndSize ' Update the font and size cbos
- Call UpdateAlignment ' Set buttons according to selection alignment
- End If
- End Sub
- Private Sub mnuFormatFreezePanes_Click()
- Dim pSelection As F1RangeRef
- Dim ss As F1Book
- Set ss = MainFrame.ActiveForm.ss
- If SSIsActiveForm() Then
- Set pSelection = MainFrame.ActiveForm.ss.SelectionEx(0)
-
- If ss.FixedCols > 0 Or ss.FixedRows > 0 Then 'UnFreeze Panes
- ss.FixedCols = 0
- ss.FixedRows = 0
-
- Else ' Fix the rows and/or cols
- 'check for just one cell selection and fix both row and col.
- If pSelection.StartRow = pSelection.EndRow Then
- If pSelection.StartCol = pSelection.EndCol Then
- ss.FixedCol = 1
- ss.FixedCols = pSelection.StartCol - 1
- ss.FixedRow = 1
- ss.FixedRows = pSelection.StartRow - 1
- Exit Sub
- End If
- End If
-
- If pSelection.EndRow = 16384 Then 'fix column(s)
- ss.FixedCol = pSelection.StartCol
- ss.FixedCols = pSelection.Cols
-
- ElseIf pSelection.EndCol = 256 Then 'fix rows
- ss.FixedRow = pSelection.StartRow
- ss.FixedRows = pSelection.Rows
-
- Else
- MsgBox "Cannot fix cells or freeze panes based on the current selection."
-
- End If
- End If
-
- End Sub
- Private Sub mnuFormatObject_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.FormatObjectDlg F1AllPages
- End If
- mnuFormatObject.Enabled = False
- End Sub
- Private Sub mnuFormatPrintArea_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.SetPrintAreaFromSelection
- End If
- End Sub
- Private Sub mnuFormatPrintTitles_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.SetPrintTitlesFromSelection
- End If
- End Sub
- Private Sub mnuFormatRowDefaultHgt_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.DefRowHeightDlg
- End If
- End Sub
- Private Sub mnuFormatRowHeight_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.RowHeightDlg
- End If
- End Sub
- Private Sub mnuFormatRowHide_Click()
- Dim pSelection As F1RangeRef
- If SSIsActiveForm() Then
- Set pSelection = MainFrame.ActiveForm.ss.SelectionEx(0)
- MainFrame.ActiveForm.ss.SetRowHidden pSelection.StartRow, pSelection.EndRow, True
- End If
- End Sub
- Private Sub mnuFormatRowUnhide_Click()
- Dim pSelection As F1RangeRef
- If SSIsActiveForm() Then
- Set pSelection = MainFrame.ActiveForm.ss.SelectionEx(0)
- MainFrame.ActiveForm.ss.SetRowHidden pSelection.StartRow, pSelection.EndRow, False
- End If
- End Sub
- Private Sub mnuFormatSendToBack_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.ObjSendToBack
- End If
- mnuFormatSendToBack.Enabled = False
- End Sub
- Private Sub mnuFormatSheetProperties_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.FormatSheetDlg F1AllPages, False
- End If
- End Sub
- Private Sub mnuFormatSheetProtection_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.EnableProtection = Not MainFrame.ActiveForm.ss.EnableProtection
- If MainFrame.ActiveForm.ss.EnableProtection Then
- mnuFormatSheetProtection.Checked = True
- Else
- mnuFormatSheetProtection.Checked = False
- End If
- End If
- End Sub
- Private Sub mnuInsert_Click()
- Dim ss As F1Book
- Set ss = MainFrame.ActiveForm.ss
- If ss.Mode <> F1ModeNormal Then
- mnuInsertCancel.Enabled = True
- End If
- If ss.ObjGetSelectionCount > 0 Then
- mnuInsertCells.Enabled = False
- mnuInsertRows.Enabled = False
- mnuInsertColumns.Enabled = False
- mnuInsertPageBreak.Enabled = False
- Else
- mnuInsertCells.Enabled = True
- mnuInsertRows.Enabled = True
- mnuInsertColumns.Enabled = True
- mnuInsertPageBreak.Enabled = True
- End If
- End Sub
- Private Sub mnuInsertCancel_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.Mode = F1ModeNormal
- End If
- mnuInsertCancel.Enabled = False
- End Sub
- Private Sub mnuInsertCells_Click()
- On Local Error Resume Next
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.InsertDlg
- End If
- End Sub
- Private Sub mnuInsertChart_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.Mode = F1ModeChart
- tlbDraw.Buttons.Item(12).Value = tbrPressed
- End If
- End Sub
- Private Sub mnuInsertColumns_Click()
- On Local Error Resume Next
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.EditInsert F1ShiftCols
- End If
- End Sub
- Private Sub mnuInsertDOArc_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.Mode = F1ModeArc
- tlbDraw.Buttons.Item(6).Value = tbrPressed
- End If
- End Sub
- Private Sub mnuInsertDOLine_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.Mode = F1ModeLine
- tlbDraw.Buttons.Item(3).Value = tbrPressed
- End If
- End Sub
- Private Sub mnuInsertDOOval_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.Mode = F1ModeOval
- tlbDraw.Buttons.Item(5).Value = tbrPressed
-
- End If
- End Sub
- Private Sub mnuInsertDOPolygon_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.Mode = F1ModePolygon
- tlbDraw.Buttons.Item(7).Value = tbrPressed
- End If
- End Sub
- Private Sub mnuInsertDORectangle_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.Mode = F1ModeRectangle
- tlbDraw.Buttons.Item(4).Value = tbrPressed
-
- End If
- End Sub
- Private Sub mnuInsertFOButton_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.Mode = F1ModeButton
- tlbDraw.Buttons.Item(9).Value = tbrPressed
- End If
- End Sub
- Private Sub mnuInsertFOCheckbox_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.Mode = F1ModeCheckBox
- tlbDraw.Buttons.Item(10).Value = tbrPressed
- End If
- End Sub
- Private Sub mnuInsertFOListbox_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.Mode = F1ModeDropDown
- tlbDraw.Buttons.Item(11).Value = tbrPressed
- End If
- End Sub
- Private Sub mnuInsertName_Click()
- '' Activate the dialog box to define names for cells
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.DefinedNameDlg
- End If
- End Sub
- Private Sub mnuInsertPageBreak_Click()
- On Error Resume Next
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.AddPageBreak
- End If
- End Sub
- Private Sub mnuInsertRows_Click()
- On Error Resume Next
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.EditInsert F1ShiftRows
- End If
- End Sub
- Private Sub mnuInsertWorksheet_Click()
- On Error Resume Next
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.EditInsertSheets
- End If
- End Sub
- Private Sub mnuToolsOptions_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.OptionsDlg F1AllPages
- End If
- End Sub
- Private Sub mnuToolsRecalc_Click()
- If SSIsActiveForm() Then
- MainFrame.ActiveForm.ss.CheckRecalc
- End If
- End Sub
- Private Sub mnuViewFormulaBar_Click()
- mnuViewFormulaBar.Checked = Not mnuViewFormulaBar.Checked
- If mnuViewFormulaBar.Checked Then
- MainFrame.ActiveForm.ss.ShowEditBar = True
- Else
- MainFrame.ActiveForm.ss.ShowEditBar = False
- End If
- End Sub
- Private Sub mnuViewStatusBar_Click()
- sbar1.Visible = Not sbar1.Visible
- mnuViewStatusBar.Checked = Not mnuViewStatusBar.Checked
- End Sub
- Private Sub mnuViewToolbarsDrawing_Click()
- tlbDraw.Visible = Not tlbDraw.Visible
- mnuViewToolbarsDrawing.Checked = Not mnuViewToolbarsDrawing.Checked
- If mnuViewToolbarsDrawing.Checked Then
- tlbStandard.Buttons.Item(13).Value = tbrPressed
- Else
- tlbStandard.Buttons.Item(13).Value = tbrUnpressed
- End If
- End Sub
- Private Sub mnuViewToolbarsFormatting_Click()
- mnuViewToolbarsFormatting.Checked = Not mnuViewToolbarsFormatting.Checked
- If mnuViewToolbarsFormatting.Checked Then
- tlbFormat.Visible = True
- Else
- tlbFormat.Visible = False
- End If
- End Sub
- Private Sub mnuViewToolbarsStandard_Click()
- mnuViewToolbarsStandard.Checked = Not mnuViewToolbarsStandard.Checked
- If mnuViewToolbarsStandard.Checked Then
- tlbStandard.Visible = True
- Else
- tlbStandard.Visible = False
- End If
- End Sub
- Private Sub mnuWindowArrangeIcons_Click()
- MainFrame.Arrange 3
- End Sub
- Private Sub mnuWindowCascade_Click()
- MainFrame.Arrange 0
- End Sub
- Private Sub mnuWindowNew_Click()
- Call C_New
- End Sub
- Private Sub mnuWindowTile_Click()
- MainFrame.Arrang 1
- End Sub
- Private Sub Timer1_Timer()
- '' This raises all buttons when the last sheet is closed.
- '' Set the timer interval so that the user won't notice
- '' any delay during normal operations.
- Dim i%
- Dim objid&
- Dim ss As F1Book
- If SSIsActiveForm() Then
- Set ss = MainFrame.ActiveForm.ss
- End If
- 'Timer1.Enabled = False
- If MainFrame.ActiveForm Is Nothing Then
-
- For i = 1 To tlbFormat.Buttons.Count
- tlbFormat.Buttons.Item(i).Value = tbrUnpressed
- Next i
-
- For i = 1 To tlbStandard.Buttons.Count - 1
- tlbFormat.Buttons.Item(i).Value = tbrUnpressed
- Next i
-
- For i = 1 To tlbDraw.Buttons.Count
- tlbDraw.Buttons.Item(i).Value = tbrUnpressed
- Next i
-
- Else
- If ss.ObjGetSelectionCount = 1 Then 'only one object is selected
- 'Get Selected Object's ID
- ss.ObjGetSelection 0, objid
- 'Check to see if polyedit mode button should be enabled.
- If ss.ObjGetType(objid) = F1ObjPolygon Then
- tlbDraw.Buttons.Item(1).Enabled = True
- 'Debug.Print "PolyEditMode should be enabled"
- Else
- tlbDraw.Buttons.Item(1).Enabled = False
- End If
- tlbFormat.Enabled = False
- For i = 16 To 18 ' disable sum and sort buttons
- tlbStandard.Buttons.Item(i).Enabled = False
- Next i
- 'Debug.Print objid, ss.ObjGetType(objid)
- Else
- tlbFormat.Enabled = True
- tlbDraw.Buttons.Item(1).Enabled = False
- For i = 16 To 18 ' disable sum and sort buttons.
- tlbStandard.Buttons.Item(i).Enabled = True
- Next i
- End If
-
- If ss.CanEditPaste Then 'enable paste button
- tlbStandard.Buttons.Item(10).Enabled = True
- Else
- tlbStandard.Buttons.Item(10).Enabled = False
- End If
- End If
- End Sub
- Private Sub tlbDraw_ButtonClick(ByVal Button As ComctlLib.Button)
- Dim ss As F1Book
- Dim i%
-
- If Not (MainFrame.ActiveForm Is Nothing) Then
- Set ss = MainFrame.ActiveForm.ss
- Select Case Button.key
-
- Case "PointEdit"
- If ss.PolyEditMode = F1PolyEditModePoints Then
- Button.Value = tbrUnpressed
- ss.PolyEditMode = F1PolyEditModeNormal
- mnuEditPolygonPoints.Checked = False
- Else
- Button.Value = tbrPressed
- ss.PolyEditMode = F1PolyEditModePoints
- mnuEditPolygonPoints.Checked = True
- End If
-
- Case "Line"
- If ss.Mode <> F1ModeLine Then
- For i = 3 To MainFrame.tlbDraw.Buttons.Count
- MainFrame.tlbDraw.Buttons.Item(i).Value = tbrUnpressed
- Next i
- Button.Value = tbrPressed
- ss.Mode = F1ModeLine
- ElseIf ss.Mode = F1ModeLine Then
- Button.Value = tbrUnpressed
- ss.Mode = F1ModeNormal
- End If
-
- Case "Rectangle"
- If ss.Mode <> F1ModeRectangle Then
- For i = 3 To MainFrame.tlbDraw.Buttons.Count
- MainFrame.tlbDraw.Buttons.Item(i).Value = tbrUnpressed
- Next i
- Button.Value = tbrPressed
- ss.Mode = F1ModeRectangle
- ElseIf ss.Mode = F1ModeRectangle Then
- Button.Value = tbrUnpressed
- ss.Mode = F1ModeNormal
- End If
-
- Case "Oval"
- If ss.Mode <> F1ModeOval Then
- For i = 3 To MainFrame.tlbDraw.Buttons.Count
- MainFrame.tlbDraw.Buttons.Item(i).Value = tbrUnpressed
- Next i
- Button.Value = tbrPressed
- ss.Mode = F1ModeOval
- ElseIf ss.Mode = F1ModeOval Then
- Button.Value = tbrUnpressed
- ss.Mode = F1ModeNormal
- End If
-
- Case "Arc"
- If ss.Mode <> F1ModeArc Then
- For i = 3 To MainFrame.tlbDraw.Buttons.Count
- MainFrame.tlbDraw.Buttons.Item(i).Value = tbrUnpressed
- Next i
- Button.Value = tbrPressed
- ss.Mode = F1ModeArc
- ElseIf ss.Mode = F1ModeArc Then
- Button.Value = tbrUnpressed
- ss.Mode = F1ModeNormal
- End If
-
- Case "Polygon"
- If ss.Mode <> F1ModePolygon Then
- For i = 3 To MainFrame.tlbDraw.Buttons.Count
- MainFrame.tlbDraw.Buttons.Item(i).Value = tbrUnpressed
- Next i
- Button.Value = tbrPressed
- ss.Mode = F1ModePolygon
- ElseIf ss.Mode = F1ModePolygon Then
- Button.Value = tbrUnpressed
- ss.Mode = F1ModeNormal
- End If
-
- Case "Button"
- If ss.Mode <> F1ModeButton Then
- For i = 3 To MainFrame.tlbDraw.Buttons.Count
- MainFrame.tlbDraw.Buttons.Item(i).Value = tbrUnpressed
- Next i
- Button.Value = tbrPressed
- ss.Mode = F1ModeButton
- ElseIf ss.Mode = F1ModeButton Then
- Button.Value = tbrUnpressed
- ss.Mode = F1ModeNormal
- End If
-
- Case "Checkbox"
- If ss.Mode <> F1ModeCheckBox Then
- For i = 3 To MainFrame.tlbDraw.Buttons.Count
- MainFrame.tlbDraw.Buttons.Item(i).Value = tbrUnpressed
- Next i
- Button.Value = tbrPressed
- ss.Mode = F1ModeCheckBox
- ElseIf ss.Mode = F1ModeCheckBox Then
- Button.Value = tbrUnpressed
- ss.Mode = F1ModeNormal
- End If
-
- Case "Listbox"
- If ss.Mode <> F1ModeDropDown Then
- For i = 3 To MainFrame.tlbDraw.Buttons.Count
- MainFrame.tlbDraw.Buttons.Item(i).Value = tbrUnpressed
- Next i
- Button.Value = tbrPressed
- ss.Mode = F1ModeDropDown
- ElseIf ss.Mode = F1ModeDropDown Then
- Button.Value = tbrUnpressed
- ss.Mode = F1ModeNormal
- End If
-
- Case "Chart"
- If ss.Mode <> F1ModeChart Then
- For i = 3 To MainFrame.tlbDraw.Buttons.Count
- MainFrame.tlbDraw.Buttons.Item(i).Value = tbrUnpressed
- Next i
- Button.Value = tbrPressed
- ss.Mode = F1ModeChart
- ElseIf ss.Mode = F1ModeChart Then
- Button.Value = tbrUnpressed
- ss.Mode = F1ModeNormal
- End If
-
- End Select
- ss.SetFocus
- End If
-
- End Sub
- Private Sub tlbFormat_ButtonClick(ByVal Button As ComctlLib.Button)
- Dim ss As F1Book
- 'Do nothing if no child form is active.
- If Not (MainFrame.ActiveForm Is Nothing) Then
- Set ss = MainFrame.ActiveForm.ss
- Select Case Button.key
-
- Case "Bold"
- If Not ss.FontBold Then
- ss.FontBold = True
- Button.Value = tbrPressed
- Else
- ss.FontBold = False
- Button.Value = tbrUnpressed
- End If
-
- Case "Italics"
- If Not ss.FontItalic Then
- ss.FontItalic = True
- Button.Value = tbrPressed
- Else
- ss.FontItalic = False
- Button.Value = tbrUnpressed
- End If
-
- Case "Underline"
- If Not ss.FontUnderline Then
- ss.FontUnderline = True
- Button.Value = tbrPressed
- Else
- ss.FontUnderline = False
- Button.Value = tbrUnpressed
- End If
-
- Case "Color"
- comdlg.ShowColor
- ss.FontColor = comdlg.Color
-
- Case "Left"
- If ss.HAlign <> F1HAlignLeft Then
- ss.HAlign = F1HAlignLeft
- Button.Value = tbrPressed
- tlbFormat.Buttons.Item(9).Value = tbrUnpressed
- tlbFormat.Buttons.Item(10).Value = tbrUnpressed
- tlbFormat.Buttons.Item(11).Value = tbrUnpressed
- Else
- ss.HAlign = F1HAlignGeneral
- Button.Value = tbrUnpressed
- End If
-
- Case "Center"
- If ss.HAlign <> F1HAlignCenter Then
- ss.HAlign = F1HAlignCenter
- Button.Value = tbrPressed
- tlbFormat.Buttons.Item(8).Value = tbrUnpressed
- tlbFormat.Buttons.Item(10).Value = tbrUnpressed
- tlbFormat.Buttons.Item(11).Value = tbrUnpressed
- Else
- ss.HAlign = F1HAlignGeneral
- Button.Value = tbrUnpressed
- End If
-
- Case "Right"
- If ss.HAlign <> F1HAlignRight Then
- ss.HAlign = F1HAlignRight
- Button.Value = tbrPressed
- tlbFormat.Buttons.Item(8).Value = tbrUnpressed
- tlbFormat.Buttons.Item(9).Value = tbrUnpressed
- tlbFormat.Buttons.Item(11).Value = tbrUnpressed
- Else
- ss.HAlign = F1HAlignGeneral
- Button.Value = tbrUnpressed
- End If
-
- Case "Across"
- If ss.HAlign <> F1HAlignCenterAcrossCells Then
- ss.HAlign = F1HAlignCenterAcrossCells
- Button.Value = tbrPressed
- tlbFormat.Buttons.Item(8).Value = tbrUnpressed
- tlbFormat.Buttons.Item(9).Value = tbrUnpressed
- tlbFormat.Buttons.Item(10).Value = tbrUnpressed
- Else
- ss.HAlign = F1HAlignGeneral
- Button.Value = tbrUnpressed
- End If
-
- Case "Fixed"
- PopupMenu mnuFixed
-
- Case "Currency"
-
- Case "Percent"
-
- Case "Fraction"
-
- Case "Date_time"
-
- End Select
-
- ss.SetFocus
- End If
- End Sub
- Private Sub tlbStandard_ButtonClick(ByVal Button As ComctlLib.Button)
- Dim ss As F1Book
- Dim lRow&, lCol&
- Dim iTypeAbove%, iTypeLeft%
- Dim rc1$, rc2$
- Dim r1&, r2&, c1&, c2&
- Dim rangeref As F1RangeRef
- Dim bFlag As Boolean
- If Not (MainFrame.ActiveForm Is Nothing) Then
- Set ss = MainFrame.ActiveForm.ss
- End If
- Select Case Button.key
- Case "New"
- Button.Value = tbrPressed
- C_New
- Button.Value = tbrUnpressed
-
- Case "Open"
- Button.Value = tbrPressed
- Call SSMDIOpenFile("")
- Button.Value = tbrUnpressed
-
- Case "Save"
- If Not (MainFrame.ActiveForm Is Nothing) Then
- Button.Value = tbrPressed
- Call C_Save
- Button.Value = tbrUnpressed
- End If
-
- Case "Print"
- If Not (MainFrame.ActiveForm Is Nothing) Then
- Button.Value = tbrPressed
- ss.FilePrint False
- Button.Value = tbrUnpressed
- End If
-
- Case "Preview"
- If Not (MainFrame.ActiveForm Is Nothing) Then
- Button.Value = tbrPressed
- If SSIsActiveForm() Then
- ss.FilePrintPreview
- End If
- Button.Value = tbrUnpressed
- End If
-
- Case "Cut"
- If Not (MainFrame.ActiveForm Is Nothing) Then
- Call C_Cut
- End If
-
- Case "Copy"
- If Not (MainFrame.ActiveForm Is Nothing) Then
- Call C_Copy
- End If
-
- Case "Paste"
- If Not (MainFrame.ActiveForm Is Nothing) Then
- Call C_Paste
- End If
-
- Case "Painter"
- ' Turn the format painter flag on.
- ' The actual format painting code is in the SelChange and
- ' the MouseUp events.
-
- If Not (MainFrame.ActiveForm Is Nothing) Then
-
- ' If there is no cell selection then skip
- ' This could happen if a drawing object is selected
- If FormatPainterFlag = 0 Then
- Button.Value = tbrPressed
- Painterclick = True
- If ss.SelectionCount = 0 Then
- Beep
- Else
- ' Set the Format Painter Flag for use later and copy the
- ' current selection's formatting
- FormatPainterFlag = 1
- ss.EditCopy
-
- ' Change the mousepointer to signify we are in
- ' Format Painter Mode.
- ' ss.MousePointer = f1MouseCustom
- End If
- Else
- Button.Value = tbrUnpressed
- FormatPainterFlag = 0
- Painterclick = False
- 'ss.MousePointer = f1Default
- End If
-
- ss.SetFocus
- End If
-
- Case "Draw"
- Call mnuViewToolbarsDrawing_Click
-
-
- Case "Spell"
- If Not (MainFrame.ActiveForm Is Nothing) Then
- 'Button.Value = tbrPressed
- 'Call SpellCheck
- 'Button.Value = tbrUnpressed
- MsgBox "VisualSpeller must be installed for this option to work."
- Button.Value = tbrUnpressed
- Button.Enabled = False
- End If
-
- Case "Sum"
- If Not (MainFrame.ActiveForm Is Nothing) Then
- lRow = ss.Row
- lCol = ss.Col
- iTypeAbove = ss.TypeRC(lRow - 1, lCol)
- iTypeLeft = ss.TypeRC(lRow, lCol - 1)
-
- If (iTypeAbove = 0 And iTypeLeft = 0) Then 'not sure what is to be summed
- ss.Formula = "Sum"
- ss.StartEdit False, True, True
-
- ElseIf iTypeAbove = 0 And iTypeLeft <> 0 Then 'sum values to the left
- rc2 = ss.FormatRCNr(lRow, lCol - 1, False)
- lCol = lCol - 1
-
- Do
- lCol = lCol - 1
- iTypeLeft = ss.TypeRC(lRow, lCol)
- If iTypeLeft = 1 Or iTypeLeft = -1 Or iTypeLeft = 4 Or iTypeLeft = -4 Then
- bFlag = False
- Else
- bFlag = True
- End If
- Loop Until (lCol = 1 Or bFlag)
-
- rc1 = ss.FormatRCNr(lRow, lCol + 1, False)
- 'Enter Formula
- ss.Formula = "Sum(" & rc1 & ":" & rc2 & ")"
-
- 'Set selection of the Formula
- ss.Selection = rc1 & ":" & rc2
- ss.SetFocus
-
- Else 'sum values above
- rc2 = ss.FormatRCNr(lRow - 1, lCol, False)
- lRow = lRow - 1
-
- Do
- lRow = lRow - 1
- iTypeAbove = ss.TypeRC(lRow, lCol)
- If iTypeAbove = 1 Or iTypeAbove = -1 Or iTypeAbove = 4 Or iTypeAbove = -4 Then
- bFlag = False
- Else
- bFlag = True
- End If
- Loop Until (lRow = 1 Or bFlag)
-
- rc1 = ss.FormatRCNr(lRow + 1, lCol, False)
-
- ss.Formula = "Sum(" & rc1 & ":" & rc2 & ")"
- ss.Selection = rc2 & ":" & rc1
-
- ss.SetFocus
-
- End If
- Button.Value = tbrUnpressed
- End If
- Case "SortA", "SortD"
- If Not (MainFrame.ActiveForm Is Nothing) Then
- Set rangeref = ss.SelectionEx(0)
- With rangeref
- r1 = .StartRow
- r2 = .EndRow
- c1 = .StartCol
- c2 = .EndCol
- End With
- If Button.key = "SortA" Then
- ss.Sort3 r1, c1, r2, c2, True, 1, 0, 0
- Else 'button.key = "sortD"
- ss.Sort3 r1, c1, r2, c2, True, -1, 0, 0
- End If
- Button.Value = tbrUnpressed
- End If
- End Select
-
- If Not (MainFrame.ActiveForm Is Nothing) Then
- MainFrame.ActiveForm.ss.SetFocus
- End If
- End Sub
- Private Sub tlbStandard_DblClick()
- 'since the MS toolbar doesn't accept doubleclick messages when over buttons _
- and there is not a button dbl click event, the format painter cannot function _
- like excel when double clicking on the format painter button. The format _
- will only work on one selection at a time.
- ' If FormatPainterFlag > 0 And Painterclick Then
- ' FormatPainterFlag = 3
- ' tlbStandard.Buttons.Item(11).Value = tbrPressed
- ' End If
- End Sub
-